/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.yxw.live_vod_facade.enums;

/**
 *
 * @author Administrator
 */
public enum LiveStateEnum {
    //流状态:0申请推流,1推流中,2推流中断,3店铺禁播,4直播结束,5直播异常
    LIVE_FILED(0, "审核通过"),
    LIVE_ONLINE(1, "直播中"),
    LIVE_STOP(2, "直播中断"),
    LIVE_LIMITED(3, "店铺禁播"),
    LIVE_END(4, "直播结束"),
    LIVE_ERROR(5, "直播异常");
    


    LiveStateEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getDesByCode(Integer code) {
        for (LiveStateEnum statusEnum : LiveStateEnum.values()) {
            if (statusEnum.getCode().equals(code)) {
                return statusEnum.getDesc();
            }
        }
        return code.toString();
    }

    
    private Integer code;
    private String desc;


    public Integer getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
